Skip to content

Conversation

@liam923
Copy link
Contributor

@liam923 liam923 commented Nov 21, 2025

This PR makes Merlin support hovering a jkind abbreviation to see the expanded form of the abbreviation.

@liam923 liam923 marked this pull request as ready for review November 28, 2025 15:53
Copy link
Contributor

@dkalinichenko-js dkalinichenko-js left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would I test this in an editor?

@liam923
Copy link
Contributor Author

liam923 commented Dec 3, 2025

I also expect that we'll want more tests once we have jkind abbreviations.

@liam923
Copy link
Contributor Author

liam923 commented Dec 3, 2025

How would I test this in an editor?

I can walk you through this in-person. It'd be difficult to do this in vscode because I believe an LSP change will also be necessary. But I believe that emacs just calls this type-enclosing command directly, so that would be a matter of building Merlin locally and then pointing emacs at it.

Copy link
Contributor

@dkalinichenko-js dkalinichenko-js left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. I'm good with approving this based on merlin tests + the fact that you tested this then.

$ hover 10 18 1
val f : ('a : immediate). 'a -> 'a
^
"immediate)" : "value mod global many stateless immutable external_ non_float"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does it print the closing bracket here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't invesitgated this much, but I suspect that it's a bug in the parser where the wrong location is being recorded. There's some other tests in this file where an extra following character is printed (but in those other cases, it's a space rather than a paren).

@liam923 liam923 merged commit 8f7ec00 into main Dec 4, 2025
1 check passed
@liam923 liam923 deleted the jkind-hover branch December 4, 2025 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants